#include <stdlib.h>
#include <juanmabc.h>
#include "tcItems.h"

int
main(int argc, const char **argv)
{
	if(argc == 3)
	{
		unsigned int str, items;

		jmbcCreateContext();
		tcItemsCreateContext();
		tlGenStrings(1, &str);
		tcGenItemses(1, &items);
		tlStringLoadC(str, argv[1]);
		tcItemsCompile(items, str);
		tlStringUnload(str);
		tlStringLoadC(str, argv[2]);
		tcItemsSave(items, str);
		tlStringUnload(str);
		tcItemsUnload(items);
		tcDeleteItemses(1, &items);
		tlDeleteStrings(1, &str);
		jmbcDestroyContext();
	}
	else
		wprintf(L"%hs From To\n", argv[0]);

	return EXIT_SUCCESS;
}
